home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TOOMBS1.TAS
< prev
next >
Wrap
Text File
|
1991-04-21
|
3KB
|
96 lines
{Date: 11-Apr-91 22:19 PDT
From: Dan Lucey [73116,3033]
Subj: Toombs Stochastic
Martin -
Certainly. But you must admit that my programming is certainly UNIQUE!
I have added the SAR to that program and it has improved the performance.
If the SAR is below the cost line, it equals 1; if the SAR is above the cost
line, it equals -1.
Buy is now Toombs = 2 and SAR = 1.
Sell is now Toombs = -1 and SAR = -1.
Here is a working copy.
Dan Lucey
}
{-------------------------------------------------------------------------}
#max_quotes 200
#OUTPUT_FILE 'TOOMBS1.LST'
FORM_C_DUMP :=0;
FORM_D_DUMP :=0;
FORM_E_DUMP :=0;
FORM_F_DUMP :=0;
FORM_G_DUMP :=0;
FORM_X_DUMP :=0;
FORM_Y_DUMP :=0;
{-------------------------------------------------------------------------
-}
FORML_A : Array;
FORML_A := mov(stoch(20,1),5,'E'); {Formula #28}
{-------------------------------------------------------------------------
-}
FORML_B : Array;
FORML_B := mov(mov(stoch(20,1),5,'E'),5,'E'); {Formula #29}
{-------------------------------------------------------------------------
-}
If FORML_B[0] >= 84 then {Formula #30}
FORM_C_DUMP := 1;
else
FORM_C_DUMP := 0;
{-------------------------------------------------------------------------
-}
FORM_X_DUMP := FORML_B[0] - FORML_A[0];
{-------------------------------------------------------------------------
-}
If FORML_B[0] < 70 and (FORM_X_DUMP >= 4) then
FORM_D_DUMP := 2;
else {Formula #31}
FORM_D_DUMP := 0;
{-------------------------------------------------------------------------
-}
FORM_E_DUMP = FORM_C_DUMP + FORM_D_DUMP; {Formula #32}
{-------------------------------------------------------------------------
-}
If FORML_B[0] > 30 and (FORM_X_DUMP <= -4) then
FORM_F_DUMP := -1;
else {Formula #33}
FORM_F_DUMP := 0;
{-------------------------------------------------------------------------
-}
FORM_G_DUMP := FORM_E_DUMP + FORM_F_DUMP; {Formula #34}
{-------------------------------------------------------------------------
-}
{Test program to determine if SAR can be used with TOOMBS STOCHASTIC}
T_SAR : Array;
T_SAR :=SAR(.02,.20);
{------------------------------------------------------------------------}
If (T_SAR[0] < C[0]) then
FORM_Y_DUMP := 1;
else
FORM_Y_DUMP := -1;
{-------------------------------------------------------------------------
}
If first_ticker then
begin
Writeln('Tick Name Close Toombs SAR Action');
Writeln(' ');
end;
begin
Write(TICKER,FULLNAME,'\t',C,' ',Int(FORM_G_DUMP),' ',Int(FORM_Y_DUMP));
If ((Int(FORM_G_DUMP) = 2) and (Int(FORM_Y_DUMP)= 1)) then
Writeln(' ***BUY*** ')
else
If ((Int(FORM_G_DUMP) = -1) and (Int(FORM_Y_DUMP) = -1)) then
Writeln(' ***SELL*** ')
else
Writeln(' ');
end;
{--------------------END TOOMBS.TAS-------------------------------------}